﻿using System.Windows;
using System.Windows.Controls;
namespace Tfs.OnTheRoad.Controls
{
    /// <summary>
    /// Reusable ChangesetsList Control
    /// DataContext should be a ChangesetListViewModel
    /// </summary>
	public partial class ChangesetsListControl : UserControl
	{
        public ChangesetsListControl()
		{
			// Required to initialize variables
			InitializeComponent();
            this.Loaded += new RoutedEventHandler(ChangesetsListControl_Loaded);
		}

        void ChangesetsListControl_Loaded(object sender, RoutedEventArgs e)
        {
            //We set it to -1 to avoid that the selectionChanged event is not being triggered if we are coming back
            //to this page(back button)
            ChangesetsListBox.SelectedIndex = -1;
        }

        public Visibility ProgressBarVisibility
        {
            get ;
            set ;
        }
    }
}